<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>首页</h1>
<p th:text="${tips}"></p>
<p th:if="${session.currentUser == null}">
    <a th:href="@{/toLogin}">登录</a>
</p>
<hr>
<!--验证当前用户是否有指定权限-->
<div shiro:hasPermission="user:update">
    <!--请求路径-->
    <a th:href="@{/user/update}">修改用户</a>
</div>
<div shiro:hasPermission="user:add">
    <a th:href="@{/user/add}">添加用户</a>
</div>
</body>
</html>